package com.hu.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hu.mapper.QuestionBankMapper;
import com.hu.mapper.QuestionBankQuestionMapper;
import com.hu.pojo.entity.QuestionBank;
import com.hu.pojo.entity.QuestionBankQuestion;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Slf4j
@Repository
public class QuestionBankDao extends ServiceImpl<QuestionBankMapper, QuestionBank> implements IService<QuestionBank> {

    public Page<QuestionBank> findQuestionBankPageByIds(Page<QuestionBank> bankPage, Set<Long> questionBankIds) {
        return lambdaQuery().in(QuestionBank::getId,questionBankIds).page(bankPage);
    }
}